package com.ddstation.crm.accountManage.mapper;

import com.ddstation.crm.accountManage.Entity.AccountManageEntity;
import com.ddstation.crm.institution.entity.DtHealthManageInstitutionBuyAccountEntity;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface AccountManageMapper {

	public List<AccountManageEntity> getAllAccount(@Param("institutionName") String institutionName, @Param("name") String name, @Param("phone") String phone, @Param("limit") Integer limit, @Param("offset") Integer offset);
	public int getAccountCnt(@Param("institutionName") String institutionName, @Param("name") String name, @Param("phone") String phone);
	public int updateAccountType(
            @Param("accountType") Integer accountType,
            @Param("validBeginDt") Date validBeginDt,
            @Param("validEndDt") Date validEndDt,
            @Param("institutionId") String institutionId,
            @Param("doctorId") Integer doctorId);
	public List<Map<String, Object>> getAccountTypeList();
	public AccountManageEntity getAccountInfo(@Param("institutionId") String institutionId, @Param("doctorId") Integer doctorId);
	public List<Map<String, Object>> getAccountNowCnt(@Param("institutionId") String institutionId);
	public int addAccountType(List<DtHealthManageInstitutionBuyAccountEntity> entityList);

	public List<AccountManageEntity> selectFreeAccount(@Param("institutionId") String institutionId);
}
